package com.xique.door.service.impl;



import com.xique.common.core.text.Convert;
import com.xique.common.core.utils.DateUtils;
import com.xique.door.bean.domain.VerifyRecords;
import com.xique.door.bean.request.VerifyRecordsRequest;
import com.xique.door.mapper.VerifyRecordsMapper;
import com.xique.door.service.IVerifyRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 一体机识别记录Service业务层处理
 * 
 * @author caogq
 * @date 2021-06-22
 */
@Service
public class VerifyRecordsServiceImpl implements IVerifyRecordsService
{
    @Autowired
    private VerifyRecordsMapper verifyRecordsMapper;

    /**
     * 查询一体机识别记录
     * 
     * @param id 一体机识别记录ID
     * @return 一体机识别记录
     */
    @Override
    public VerifyRecords selectVerifyRecordsById(Long id)
    {
        return verifyRecordsMapper.selectVerifyRecordsById(id);
    }

    /**
     * 查询一体机识别记录列表
     * 
     * @param verifyRecords 一体机识别记录
     * @return 一体机识别记录
     */
    @Override
    public List<VerifyRecords> selectVerifyRecordsList(VerifyRecords verifyRecords)
    {
        return verifyRecordsMapper.selectVerifyRecordsList(verifyRecords);
    }

    /**
     * 新增一体机识别记录
     * 
     * @param verifyRecords 一体机识别记录
     * @return 结果
     */
    @Override
    public int insertVerifyRecords(VerifyRecords verifyRecords)
    {
        verifyRecords.setCreateTime(DateUtils.getNowDate());
        return verifyRecordsMapper.insertVerifyRecords(verifyRecords);
    }

    /**
     * 修改一体机识别记录
     * 
     * @param verifyRecords 一体机识别记录
     * @return 结果
     */
    @Override
    public int updateVerifyRecords(VerifyRecords verifyRecords)
    {
        verifyRecords.setUpdateTime(DateUtils.getNowDate());
        return verifyRecordsMapper.updateVerifyRecords(verifyRecords);
    }

    /**
     * 删除一体机识别记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVerifyRecordsByIds(String ids)
    {
        return verifyRecordsMapper.deleteVerifyRecordsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除一体机识别记录信息
     * 
     * @param id 一体机识别记录ID
     * @return 结果
     */
    @Override
    public int deleteVerifyRecordsById(Long id)
    {
        return verifyRecordsMapper.deleteVerifyRecordsById(id);
    }

    @Override
    public List<VerifyRecords> searchVerifyRecordsList(VerifyRecordsRequest verifyRecordsRequest) {
        return verifyRecordsMapper.searchVerifyRecordsList(verifyRecordsRequest);
    }
}
